#include<stdio.h>
#include<stdlib.h>

#include "tree.h"


int main (int argc, const char * argv[]) {
	
	tree t;
	init(&t);
	char* a[] = { "renato", "renato", "macbook", "steve", "bere", "renato", "macbook", "dormire", "boh", "che", "ne", "macbook"    };
	int i;
	for (i=0; i<10; i++) {
		printf("Inserisco il valore: %s\n", a[i]);
		insert(&t, a[i]);  
		
		
	}
	
	printf("\n ---------------------");
	tree newt;
	init(&newt);
	printf("\1\n");	
	printf("\nCont Parole\n");
	print_insert_OrderParole(t,&newt);
	printf("\3\n");	
	print_post(newt);	
	printf("\n ---------------------");
	
	
	printf("\nINORDER\n");
	print_in(t);
	
	printf("\nREVORDER\n");
	print_rev(t);
	
	printf("\nPREORDER\n");
	print_pre(t);
	
	printf("\nPOSTORDER\n");
	print_post(t);
	
	
	
	printf("\n ---------------------");
	
	
	
	for(i=0; i<10; i++) {
		printf("%s %i \n", a[i], cverb(a[i]));;
		
	}
	
	destroy_t(&t);
	
} 
